package dataPrp;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class Fresher {

	public static void main(String[] args) throws Exception{
		BufferedReader br = new BufferedReader(new FileReader("/Users/macpro724/Desktop/ml_prj/result_1206.txt"));
		
		BufferedWriter bw = new BufferedWriter(new FileWriter("/Users/macpro724/Desktop/ml_prj/result_1206_out.txt"));
		
		String line = null;
		
		while ((line = br.readLine()) != null){
			int length = line.length();
			int num = length/5;
			int other = length%5;
			String otherS = line.substring(num*5, line.length());
			int begin = 0;
			if (num > 1){
				String tempString = line.substring(begin + (num-1)*5, begin + num*5);
				if (!tempString.contains(".")) 
				{
					otherS = tempString + otherS;
					num = num -1;
				}
			}
			for (int i = 0; i < num; i ++){
				bw.write(line.substring(begin + i*5, begin + 5 + i*5) + "\n");
			}
			bw.write(otherS + "\n");
		}
		
		
		br.close();
		bw.close();
	}
	
}
